package com.cn.jx.manager.po;

import com.cn.jx.common.entity.BaseIdEntity;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * <p>DataGrid 动态列POJO类 对应数据库表名 SYS_DATA_GRID
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseIdEntity <tt>BaseIdEntity</tt>}
 * 
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_DATA_GRID")
public class DataGrid  extends BaseIdEntity {
	
	private static final long serialVersionUID = 4295498676479725025L;
	
	/** <p>表字段映射field 对应的实体类的属性 <p>设置为{@link String String}类型*/
	@Column(name="t_field",length=32)
	private String field;
	
	/** <p>单元格宽度 <p>设置为{@link String String}类型*/
	@Column(name="t_width",length=10)
	private String width;
	
	/** <p>表头居中 <p>设置为{@link String String}类型*/
	@Column(name="t_halign",length=10)
	private String halign;
	
	/** <p>表格内容居中 <p>设置为{@link String String}类型*/
	@Column(name="t_align",length=10)
	private String align;
	
	/** <p>是否排序 值 false,true <p>设置为{@link String String}类型*/
	@Column(name="t_sortable",length=10)
	private String sortable;
	
	/** <p>格式化函数，页面上必须有对应的写好的js函数function <p>设置为{@link String String}类型*/
	@Column(name="t_formatter",length=64)
	private String formatter;
	
	/** <p>文本内容 <p>设置为{@link String String}类型*/
	@Column(name="t_text",length=64)
	private String text;
	
	/** <p>排序位置，此列显示在第几个位置 <p>设置为{@link String String}类型*/
	@Column(name="sort")
	private Integer sort;
	
	/** <p>开关 off on 是否显示此列 <p>设置为{@link String String}类型*/
	@Column(name="switch_on_off",length=64)
	private String switchOnOff;
	
	/** <p>表格类型归属哪个表格 <p>设置为{@link String String}类型*/
	@Column(name="grid_type",length=64)
	private String gridType;
	
	/**
	 * 初始化创建类
	 * @return
	 */
	public static DataGrid getInstance(){
		DataGrid m=new DataGrid();
		m.setId(getRandomId());
		return m;
	}

	/** <p>{@link String String}<p>getGridType()*/
	public String getGridType() {
		return gridType;
	}
	/** <p>{@link String String}<p>getField()*/
	public String getField() {
		return field;
	}
	/** <p>{@link String String}<p>getWidth()*/
	public String getWidth() {
		return width;
	}
	/** <p>{@link String String}<p>getHalign()*/
	public String getHalign() {
		return halign;
	}
	/** <p>{@link String String}<p>getAlign()*/
	public String getAlign() {
		return align;
	}
	/** <p>{@link String String}<p>getSortable()*/
	public String getSortable() {
		return sortable;
	}
	/** <p>{@link String String}<p>getFormatter()*/
	public String getFormatter() {
		return formatter;
	}
	/** <p>{@link String String}<p>getText()*/
	public String getText() {
		return text;
	}
	/** <p>{@link String String}<p>getSort()*/
	public Integer getSort() {
		return sort;
	}
	/** <p>{@link String String}<p>getSwitchOnOff()*/
	public String getSwitchOnOff() {
		return switchOnOff;
	}
	
	/** <p>setGridType({@link String gridType})*/
	public void setGridType(String gridType) {
		this.gridType = gridType;
	}
	/** <p>setField({@link String field})*/
	public void setField(String field) {
		this.field = field;
	}
	/** <p>setWidth({@link String width})*/
	public void setWidth(String width) {
		this.width = width;
	}
	/** <p>setHalign({@link String halign})*/
	public void setHalign(String halign) {
		this.halign = halign;
	}
	/** <p>setAlign({@link String align})*/
	public void setAlign(String align) {
		this.align = align;
	}
	/** <p>setSortable({@link String sortable})*/
	public void setSortable(String sortable) {
		this.sortable = sortable;
	}
	/** <p>setFormatter({@link String formatter})*/
	public void setFormatter(String formatter) {
		this.formatter = formatter;
	}
	/** <p>setText({@link String text})*/
	public void setText(String text) {
		this.text = text;
	}
	/** <p>setSort({@link String sort})*/
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	/** <p>setSwitchOnOff({@link String switchOnOff})*/
	public void setSwitchOnOff(String switchOnOff) {
		this.switchOnOff = switchOnOff;
	}
}
